#pragma once

#include "Types.h"
#include "DLL.h"
#include "WireTool.h"

namespace My {

///Circle Tool is a wire tool having form of circle and integer radius
class DLL_API CircleTool : public WireTool
{
public:
	CircleTool(ZoomBench & owner, int StartSize = 20);

	int GetSize() const
		{ return m_CircleBitmap.width() / 2; }
	int GetDoubleSize() const
		{ return m_CircleBitmap.width(); }
	const img::bitmap & GetCircleBitmap() const
		{ return m_CircleBitmap; }
	point<int> GetWireBenchTopLeft(CPoint p) const;
	rect<int> GetWireBenchRect(CPoint p) const;

	static void CircleBitmap(img::bitmap & bmp, int radius);

public:
	virtual void IncreaseSize(int inc);
	virtual CRect GetWireRect(CPoint p);
	virtual void DrawWire(CDC * pDC, CPoint p, int width);

private:
	void CreateCircleBitmap(int radius);

private:
	img::bitmap m_CircleBitmap; ///< filled circle
};

} //namespace My
